package day03;
/**
 * if分支结构
 * @author XingHaiYang
 * @date 2022/9/5 14:37
 */
public class IfDemo {
    public static void main(String[] args) {
        //1)偶数的判断:
        int num = 5; //带数(6,5)
        if(num%2==0){
            System.out.println(num+"是偶数");
        }
        System.out.println("继续执行...");
        //2)满500打8折:
        double price = 300.0; //消费金额   带数(600.0,300.0)
        if(price>=500){ //满500
            price *= 0.8; //打8折
        }
        System.out.println("最终结算金额为:"+price);
        //3)判断年龄是否在18到50之间(包含)，若在范围内则输出:满足条件
        int age = 88; //带数(38,8,88)
        if(age>=18 && age<=50){
            System.out.println("满足条件");
        }
        System.out.println("继续执行...");
    }
}
